<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			
			var time=new Date();
			var year=time.getFullYear();
			var month=time.getMonth()+1;
			var today=time.getDate();
			var h=time.getHours();
			var m=time.getMinutes();
			
			document.write("今天日期："+year+"-"+month+"-"+today)
			document.write("<br/>")
			document.write("现在时间："+h+"点"+m+"分")
			document.write("<br/>")
			
			 if(h<12){
			 	document.write("上午好！欢迎来到贵美");
			 }else if(12<h<18){
			　　 document.write("下午好！欢迎来到贵美");
			 }else if(h>18){
			 	document.write("下午好！欢迎来到贵美");
			 }else{
			 	document.wirte("时间错误");
			 }
		</script>
	</head>
	<body>
		
		
		
	</body>
</html>
